#!/bin/bash

source ./menu.sh

menu_items=(\
        "跳板机" \
        "腾讯云" \
        "跳板机2" \
        "跳板机win"\
        "翻墙机" \
        "公网机")

cmds[0]='ssh **@a.b.com'
cmds[1]='ssh root@host1'
cmds[2]='sshpass -p ****** ssh **@jms.hwwt2.com -p 2223'
cmds[3]='rdesktop -u ******** -p ****** ip:3390 -r sound:off -g 1920x1080'
cmds[4]='ssh root@host2'
cmds[5]='ssh root@255.255.255.251'

after_hook() {
    echo
    echo '   '${cmds[$item_index]}
}

case $1 in
    '')
        menu
        echo 连接${menu_items[$item_index]}
        exec ${cmds[$item_index]}
        ;;
    *) ssh $*;;
esac

